﻿@{
    ViewBag.Title = "援助事物处理";
}

<div class="mainContentWithBorderNopadding2" id="sosMainDiv">
    <span class="weightTitle">援助事物处理</span>
    <p class="pTitle">
        <label for="FilterRolers">角色：</label>@Html.DropDownList("FilterRolers")
        <label for="Type">事物类型：</label>
        <select id="Type" name="Type">
            <option selected="" value="">（全部）</option>
            <option value="0">求援</option>
            <option value="1">建议</option>
        </select>
        <label for="Category">事物分类：</label>
        <select id="Category" name="Category">
            <option selected="" value="">（全部）</option>
            <option value="0">工作类</option>
            <option value="1">生活类</option>
            <option value="2">法律纠纷类</option>
        </select>
        <button type="button" class="btn btn-primary" id="btnFilterSos">查询</button>
    </p>
    <div class="sosDiv" id="sosDiv">
        <table class="table table-bordered table-hover ExpandTB" id="sosTable">
            <thead>
                <tr>
                    <td>事物ID</td>
                    <td>事物类型</td>
                    <td>事物分类</td>
                    <td>提交时间</td>
                    <td>事物状态</td>
                    <td>处理时间</td>
                    <td>用户ID</td>
                    <td>用户角色</td>
                    <td>用户名称</td>
                    <td>性别</td>
                    <td>单位名称</td>
                    <td>地址</td>
                    <td>电话</td>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
        <div id="pp" class="pagination"></div>
    </div>
    <div id="divSingleSOS">
    </div>
</div>

<script id="SOS-template" type="text/x-handlebars-template">
    {{#each sosList}}
            <tr data-sosid="{{RecordId}}">
                <td>{{RecordId}}</td>
                <td>{{Type}}</td>
                <td>{{Category}}</td>
                <td>{{Date}}</td>
                <td>{{Status}}</td>
                <td>{{HandlerDate}}</td>
                <td>{{UserId}}</td>
                <td>{{RolerName}}</td>
                <td>{{UserName}}</td>
                <td>{{Sex}}</td>
                <td>{{CompanyName}}</td>
                <td>{{CompanyAddress}}</td>
                <td>{{CompanyPhone}}</td>
            </tr>
    {{/each}}
</script>

<script id="SOSItem-template" type="text/x-handlebars-template">
    <p class="sosTitle">事物ID:{{RecordId}}</p>
    <p><span>事物类型：</span><span class="spBlue">{{Type}}</span></p>
    <p><span>事物分类：</span><span class="spBlue">{{Category}}</span> <span>事物状态：</span><span class="spBlue">{{Status}}</span></p>
    <p><span>提交时间：</span><span>{{Date}}</span> <span>处理时间：</span><span class="">{{HandlerDate}}</span></p>
    <hr />
    <p>
        <span>用户ID：</span><span class="spGreen">{{UserId}}</span>
        <span>用户姓名：</span><span class="spGreen">{{UserName}}</span>
    </p>
    <p><span>用户角色：</span><span>{{RolerName}}</span></p>
    <p><span>用户性别：</span><span>{{Sex}}</span> <span>紧急联系人：</span><span class=""></span></p>
    <p><span>用户地址：</span><span></span> <span>紧急联系人地址：</span><span class=""></span></p>
    <p><span>用户电话：</span><span>{{Sex}}</span> <span>紧急联系人电话：</span><span class=""></span></p>


    <p><span>单位名称：</span><span></span></p>
    <p><span>单位地址：</span><span></span> <span>单位所属组合：</span><span class=""></span></p>
    <p><span>单位电话：</span><span></span> <span>组合负责人：</span><span class=""></span></p>
    <p><span>单位负责人：</span><span></span> <span>负责人电话：</span><span class=""></span></p>

    <hr />

    <span class="sosTitle">事物正文:</span>
    <p>{{Content}}</p>
    <p class="sosFooter" >
        <button type="button" class="btn btn-default" id="btnHandlerSOS" data-sosid="{{RecordId}}">处理完毕</button>

        <button type="button" class="btn btn-default" id="btnReturn">返回</button>
    </p>
</script>

@section scripts
{
    @Scripts.Render("~/bundles/JSTmp")
    @Scripts.Render("~/bundles/Page")
    @Scripts.Render("~/bundles/SosHandler")
}
